CR_WEAPON_SKILL = 1;
CR_DEFENSE_SKILL = 2;
CR_DODGE = 3;
CR_PARRY = 4;
CR_BLOCK = 5;
CR_HIT_MELEE = 6;
CR_HIT_RANGED = 7;
CR_HIT_SPELL = 8;
CR_CRIT_MELEE = 9;
CR_CRIT_RANGED = 10;
CR_CRIT_SPELL = 11;
CR_HIT_TAKEN_MELEE = 12;
CR_HIT_TAKEN_RANGED = 13;
CR_HIT_TAKEN_SPELL = 14;
CR_CRIT_TAKEN_MELEE = 15;
CR_CRIT_TAKEN_RANGED = 16;
CR_CRIT_TAKEN_SPELL = 17;
CR_HASTE_MELEE = 18;
CR_HASTE_RANGED = 19;
CR_HASTE_SPELL = 20;
CR_WEAPON_SKILL_MAINHAND = 21;
CR_WEAPON_SKILL_OFFHAND = 22;
CR_WEAPON_SKILL_RANGED = 23;
CR_EXPERTISE = 24;
GetLocale = function () return "enUS" end
UnitLevel = function () return 70 end
GameTooltip = {
	GetScript = function () end,
	SetScript = function () end,
}

dofile("core.lua")

local tests = {
	"",
	"+24 Agility/+4 Stamina, +4 Dodge rating and +4 Spell Crit rating/+5 Spirit",
	"+51 defense rating",
	"Equip: Increases defense rating by 22.",
	"Equip: Increases your expertise rating by 21.",
	"Hello, world",
	"Equip: Improves hit rating by 21.",
	"Equip: Improves critical strike rating by 27.",
	"Equip: Increases attack power by 72.",
	"",
}
for _, test in ipairs(tests) do
	local sg, eg, fg, v
	collectgarbage()
	sg = collectgarbage("count")
	v = ratings:ReplaceText(test)
	eg = collectgarbage("count")
	collectgarbage()
	fg = collectgarbage("count")
	print(v, (eg - sg) * 1024,  (fg - sg) * 1024)
end
